package com.sun.stockexchangesimulate.mapper;

import com.sun.stockexchangesimulate.domain.StockHolding;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;

/**
* @author sun
* @description 针对表【stock_holding(投资者-股票关系表；用于描述投资者所拥有的股票。)】的数据库操作Mapper
* @createDate 2024-10-23 14:54:34
* @Entity generator.domain.StockHolding
*/
public interface StockHoldingMapper extends BaseMapper<StockHolding> {

    @Update("update stock_holding set quantity = quantity + #{quantity} where investor_id = #{investorId} and stock_code = #{stockCode}")
    public void updateHolding(StockHolding stockHolding);
}




